
public class Edge {
	protected int cost;
	protected Node i,j;
	Edge(int c,Node a, Node b){
		//controllo parametri
		if(c>=0) cost=c;
		else throw new IllegalArgumentException();
		i=a;
		j=b;
	}
	public void setI(Node a){
		i=a;
	}
	public void setJ(Node b){
		j=b;
	}
	public Node getI(){
		return i;
	}
	public Node getJ(){
		return j;
	}
	public int  getCost(){
		return cost;
	}

}
